﻿using InhollandAir.App_Code;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace InhollandAir
{
    public partial class Site1 : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
                Dictionary<string, User> ActiveUserCache = (Dictionary<string, User>)Application["ActiveUsers"];
                if (ActiveUserCache.ContainsKey(Session.SessionID))
                {
                    hp_Login.Visible = false;
                    hp_Account.Visible = true;
                    hp_Logout.Visible = true;
                }
                else
                {
                    hp_Login.Visible = true;
                    hp_Account.Visible = false;
                    hp_Logout.Visible = false;
                }                
        }
        public string getActivePage(string pageName)
        {
            string url = Request.Url.AbsoluteUri;
            if (url.ToLower().Contains(pageName))
            {
                return "class='current-page'";
            }
            return "";

        }
    }
}